package com.lynn.boot.rabbitmqconsumer.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Description:
 * @Date: 2019-11-13 15:54
 * @Auther: lynn
 */
@Component
public class TopicReceiver {

    @RabbitHandler
    @RabbitListener(queues = "topic.man")
    public void topicManHandler(Map testMap) {
        System.out.println("topic man  消费者收到消息:" + testMap.toString());
    }

    @RabbitHandler
    @RabbitListener(queues = "topic.woman")
    public void topicWomanHandler(Map testMap) {
        System.out.println("topic Woman  消费者收到消息:" + testMap.toString());
    }
}
